#pragma once
#include<vector>

template<size_t N>
class bitset
{
private:
	std::vector<char> bit;
public:
	bitset()
	{
		bit.resize(N / 8 + 1, 0);
	}
	void set(size_t x)
	{
		size_t i = x / 8;
		size_t j = x % 8;
		bit[i] |= (1 << j);
	}
	void reset(size_t x)
	{
		size_t i = x / 8;
		size_t j = x % 8;
		bit[i] &= (~(1 << j));
	}
	bool test(size_t x)
	{
		size_t i = x / 8;
		size_t j = x % 8;
		return bit[i] & (1 << j);
	}
};